package com.ecloud.gardenscenter.common;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author Squbi
 */
@Data
@AllArgsConstructor
public class Page {
    private int pageIndex;
    private int pageSize;

    public Page() {
        this.pageIndex = 1;
        this.pageSize = 0;
    }

    public int getPageIndex() {
        return pageSize * (pageIndex - 1);
    }

    public int getPageSize() {
        return pageSize;
    }
}
